# front end team combat abilities
front_combat_menu:
.asciiz "\nWhat would you like to do?\n1. Fetch\n2. Decode\n3. Add 4\n4. Sign Extend"
front_attackone:
.asciiz "\nYou hurl a hefty stick at the enemy, while yelling 'fetch!'"	
front_attacktwo:
.asciiz "\nYour communications officer has decoded the enemy's next move, allowing you to protect yourself."	
front_attackthree:
.asciiz "\nYou use your crafty +4 unit to add to your health."	
front_attackfour:
.asciiz "\nYou close the gap between yourself and the enemy by filling the distance with zeros, striking the enemy in the face!"

front_hitchance_one:
.word 0x00000001
front_basedamage_one:
.word 0x00000001
front_basehealing_three:
.word 0x00000001
front_hitchance_four:
.word 0x00000001
front_basedamage_four:
.word 0x00000001

front_combat_select:
	li $a0, front_combat_menu
	jal libplp_uart_write_string
	nop
	jal libplp_uart_read
	nop
	move $t0, $v0
	li $t1, 0x00000031
	beq $t0, $t1, front_attack_one
	nop
	li $t1, 0x00000032
	beq $t0, $t1, front_attack_two
	nop
	li $t1, 0x00000033
	beq $t0, $t1, front_attack_three
	nop
	li $t1, 0x00000034
	beq $t0, $t1, front_attack_four
	nop
	# idiot didnt enter 1-4, do it again
	j front_combat_select
	nop
front_attack_one:
	li $a0, front_attackone
	jal libplp_uart_write_string
	nop
	# load specific attack values
	li $t4, front_hitchance_one
	lw $s4, 0($t4)
	li $t4, front_basedamage_one
	lw $s3, 0($t4)
	j player_hit
	nop
front_attack_two:
	li $a0, front_attacktwo
	jal libplp_uart_write_string
	nop
	j front_combat_select
	nop
front_attack_three:
	li $a0, front_attackthree
	jal libplp_uart_write_string
	nop
	# load base healing value
	li $t4, front_basehealing_three
	lw $s3, 0($t4)
	j player_heal
	nop
front_attack_four:
	li $a0, front_attackfour
	jal libplp_uart_write_string
	nop
	# load specific attack values
	li $t4, front_hitchance_four
	lw $s4, 0($t4)
	li $t4, front_basedamage_four
	lw $s3, 0($t4)
	j player_hit
	nop